package com.google.code.sharebyblog.bravo.currencyconvertor.domain;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Map;

public class CurrencyConversionResponse implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -2743825354398075910L;
	private String currencyFrom;
	private BigDecimal amount;
	private Map<String,BigDecimal> coverted;
	private Map<String,String> messages;
	
	
	
	/**
	 * @return the currencyFrom
	 */
	public String getCurrencyFrom() {
		return currencyFrom;
	}
	/**
	 * @param currencyFrom the currencyFrom to set
	 */
	public void setCurrencyFrom(String currencyFrom) {
		this.currencyFrom = currencyFrom;
	}
	/**
	 * @return the amount
	 */
	public BigDecimal getAmount() {
		return amount;
	}
	/**
	 * @param amount the amount to set
	 */
	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}
	/**
	 * @return the coverted
	 */
	public Map<String, BigDecimal> getCoverted() {
		return coverted;
	}
	/**
	 * @param coverted the coverted to set
	 */
	public void setCoverted(Map<String, BigDecimal> coverted) {
		this.coverted = coverted;
	}
	/**
	 * @return the messages
	 */
	public Map<String, String> getMessages() {
		return messages;
	}
	/**
	 * @param messages the messages to set
	 */
	public void setMessages(Map<String, String> messages) {
		this.messages = messages;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("CurrencyConversionResponse [currencyFrom=");
		builder.append(currencyFrom);
		builder.append(", amount=");
		builder.append(amount);
		builder.append(", coverted=");
		builder.append(coverted);
		builder.append(", messages=");
		builder.append(messages);
		builder.append("]");
		return builder.toString();
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((amount == null) ? 0 : amount.hashCode());
		result = prime * result
				+ ((coverted == null) ? 0 : coverted.hashCode());
		result = prime * result
				+ ((currencyFrom == null) ? 0 : currencyFrom.hashCode());
		result = prime * result
				+ ((messages == null) ? 0 : messages.hashCode());
		return result;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!(obj instanceof CurrencyConversionResponse))
			return false;
		CurrencyConversionResponse other = (CurrencyConversionResponse) obj;
		if (amount == null) {
			if (other.amount != null)
				return false;
		} else if (!amount.equals(other.amount))
			return false;
		if (coverted == null) {
			if (other.coverted != null)
				return false;
		} else if (!coverted.equals(other.coverted))
			return false;
		if (currencyFrom == null) {
			if (other.currencyFrom != null)
				return false;
		} else if (!currencyFrom.equals(other.currencyFrom))
			return false;
		if (messages == null) {
			if (other.messages != null)
				return false;
		} else if (!messages.equals(other.messages))
			return false;
		return true;
	}

	
	

}
